package org.anupta.realm.server.realm.packet.account;

import org.anupta.realm.main.Main;
import org.anupta.realm.server.realm.client.RealmClient;
import org.anupta.realm.server.realm.packet.RealmPacket;

public class QueueAccount extends RealmPacket {

	public QueueAccount(RealmClient client) {
		super(client);
		pack();
		doPacket();
	}

	@Override
	public void unpack() {
	}

	@Override
	public void pack() {
		int pos = 1;
        int suscribe = 0;
        int noSuscribe = 0;
        boolean isSuscribe = true;
        //TODO: Is subscribe -> subscribe++ else noSubscribe++
        packetOut.append("Af").append(pos).append('|').append(suscribe).append('|').append(noSuscribe)
                .append('|').append(isSuscribe ? 1 : 0).append("|-1").toString();
	}

	@Override
	public void doPacket() {
		client.send(packetOut.toString());
		Main.out.println(new StringBuilder("QueueAccount packet sended to : ").append(client.getIp()).toString());
	}
}
